<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .container {
            display: flex;
            height: 500px;
        }

        .aside {
            float: left;
            width: 300px;
            background: green;
        }

        .main {
            /* float: left; */
            margin-left: -100px;
            /* margin 负值 覆盖 */
            flex: 1;
            /* overflow: hidden; */
            background-color: red;
        }
    </style>
</head>

<body>
    <!-- 设计一套布局，两列式布局 aside 300px，剩下的flex：1；全给main
        侧边栏固定 主栏自适应    -->
    <div class="container">

        <aside class="aside"></aside>
        <main class="main"></main>

    </div>
</body>

</html>